<template>
    <header>
        <div class="title">
            <Headset style="width: 40px"/>
            <span>EASE-SLEEP</span>
        </div>
        <div class="right">
            <button class="item" @click="minimizable"><Minus style="width: 20px"/></button>
            <button class="item" @click="maximizable"><Plus style="width: 20px"/></button>
            <button class="item" @click="close"><Close style="width: 20px"/></button>
        </div>
    </header>
</template>

<script setup>
import { Headset, Close, Minus, Plus } from '@element-plus/icons-vue';
import { useMiniWin, useMaxWin, useCloseWin } from "@/hooks/useHeaderAction"


const { ipcRenderer } = require('electron')

function minimizable(){
    useMiniWin()
}

function maximizable(){
    useMaxWin()
}

function close(){
    useCloseWin()
}

</script>

<style lang="less" scoped>
header{
    height: 70px;
    width: 100%;
    -webkit-app-region: drag;
    display: flex;
    line-height: 70px;
    justify-content: space-between;
    box-sizing: border-box;
    user-select: none;

    .title{
        color: #ff0266;
        margin-left: 20px;
        display: flex;
        align-items: center;
        font-size: 32px;
        font-weight: bold;

        span{
            padding: 5px 0 0 20px;
        }
    }

    .right{
        display: flex;

        .item{
            padding: 0 20px;

            // &:hover{
            //     
            // }
        }

    }

}
</style>